package com.netty.prictice.thirdPojo;

import java.util.Date;

/**
 * @author shengtao
 * @Description:日期对象
 * @date 2018/09/05 18:23
 */
public class UnixTime {

    private final long value;


    public UnixTime() {
        this.value = System.currentTimeMillis() / 1000L + 2208988800L;
    }

    public long getValue() {
        return value;
    }

    public UnixTime(long value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return new Date((value - 2208988800L) * 1000L).toString();
    }
}
